package org.example.test.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.test.entity.Useradmin;

@Mapper
public interface AdminMapper {
    @Select("select * from test.useradmin where userName = #{userName} and userPass = #{userPass} ")
    Useradmin login(Useradmin useradmin);

//    @Select("select * from test.useradmin where userName = #{useradmin.userName} && userPass == #{useradmin.userName}")

    @Insert("insert into test.useradmin (userName,userPass) VALUES "+
    "(#{userName},#{userPass})")
    int register(Useradmin useradmin);
}
